//
//  LXFoodTableViewCell.m
//  bgms_d
//
//  Created by Mountain on 2/3/2019.
//  Copyright © 2019 lachesis-zhu. All rights reserved.
//

#import "LXFoodTableViewCell.h"

@implementation LXFoodTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    [self.selectBtn setBackgroundImage:[UIImage imageNamed:@"img_hollow"] forState:UIControlStateNormal];
    [self.selectBtn setBackgroundImage:[UIImage imageNamed:@"img_ellipse"] forState:UIControlStateSelected];
    UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapDown:)];
    gesture.numberOfTouchesRequired = 1;
    gesture.numberOfTapsRequired = 1;
    [self.selectTypeView addGestureRecognizer:gesture];
}

- (IBAction)selectDown:(id)sender {
    if (self.delegate && [self.delegate respondsToSelector:@selector(foodTableViewCellSelect:)]) {
        [self.delegate foodTableViewCellSelect:self];
    }
}

- (void)tapDown:(UIGestureRecognizer *)tap {
    if (self.delegate && [self.delegate respondsToSelector:@selector(foodCellTypeSelect:)]) {
        [self.delegate foodCellTypeSelect:self];
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
